#ifndef XKRNL_CTRL_H
#define XKRNL_CTRL_H

enum dtype_xkrnl_ctrl {
    TYPE(XKRNL_CTRL)=0x4320
};

enum subtype_xkrnl_ctrl {
    SUBTYPE(XKRNL_CTRL,CTL_HEAD)=0x1,
    SUBTYPE(XKRNL_CTRL,CTL_PACKET),
    SUBTYPE(XKRNL_CTRL,WHITELIST_ACTION),
    SUBTYPE(XKRNL_CTRL,AUDIT_ACTION),
    SUBTYPE(XKRNL_CTRL,SEC_ACTION)
};

typedef struct xkrnl_ctrl_ctl_head{
    int uCode;
    int wParam;
    int lParam;
    int cntLen;
}__attribute__((packed)) RECORD(XKRNL_CTRL,CTL_HEAD);

typedef struct xkrnl_ctrl_ctl_packet{
    RECORD(XKRNL_CTRL,CTL_HEAD) hdr;
    BYTE * inputBuffer;
}__attribute__((packed)) RECORD(XKRNL_CTRL,CTL_PACKET);

typedef struct tagconfig_data {
    int bWhiteListEnable;     // 只存在 0, 1 两种值
    int bWatchFileEvent;    
    int bAclEnable;
    char watchFolder[512];
    char aclFolder[512];
}__attribute__((packed)) RECORD(XKRNL_CTRL, DIR_SET);

typedef struct xkrnl_ctrl_audit_action{
    UINT32 audit_type;
    int record_num;
}__attribute__((packed)) RECORD(XKRNL_CTRL,AUDIT_ACTION);

typedef struct xkrnl_ctrl_sec_action{
    UINT32 sec_type;
    BYTE uuid[32];
}__attribute__((packed)) RECORD(XKRNL_CTRL,SEC_ACTION);

enum enum_xsecmodctl {
    READ_AUDIT = 0x43220096,
    LOAD_WL_POLICY = 0x43220097,
    LOAD_OBJ_POLICY = 0x43220098,
    LOAD_SUB_POLICY = 0x43220099,
    SET_CONFIG = 0x4322009a
};

enum enum_secctrl_type {
    // NONE,
    // AUDIT,
    STOP,
    RELOAD
};

enum enum_auditctl_type {
    NONE,
    AUDIT,
    OUTPUT
};

#endif